﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "IExternalObject.h"
#include "ElementCreationOptions.h"

namespace gcmp
{
    class IBody;

    /// \brief IDirectShape支持用户直接设置IGraphicsElementShape，支持所有的几何变换（平移，旋转，镜像，阵列）。
    class GCMP_MODEL_INTERFACE_EXPORT IDirectShape : public IExternalObject
    {
        DECLARE_CLASS_WITHOUT_DATA_MEMBERS(gcmp, IDirectShape, gcmp::IExternalObject, E1024DDA - 05BB - 4379 - 9C45 - FB42E96C359B, gcmpmodelinterface)
    public:
        /// \brief 创建IDirectShape对象。
        /// \param pDoc 文档指针。
        /// \param categoryUid 类别标识符。
        /// \param eco CreationOptions参数。
        /// \return 返回一个IDirectShape接口指针。
        static IDirectShape* Create(IDocument* pDoc, const UniIdentity& categoryUid, ElementCreationOptions eco = ElementCreationOptions::Normal);

        /// \brief 设置Element图形节点。
        /// \param pGraphicsElementShape Element图形节点。
        virtual void SetGraphicsElementShape(OwnerPtr<IGraphicsElementShape>&& pGraphicsElementShape) = 0;
    };
}



